/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"8B8C6E82-E6DE-43BB-B64F-6D2A4904271A"}
 */
function aceptar(event) {
	if (databaseManager.saveData())
	{
		globals.gAltaCtacte(null,2,concepto,importe,fecha_factura)
		databaseManager.setAutoSave(true)
		var $win = application.getWindow('ALTA_INGRESO_EXTRA')
		$win.hide()
		$win.destroy()
	}
	else
	{
		globals.DIALOGS.showErrorDialog('Error','Ocurrio un error','OK')
	}
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"FA0461C1-5CBB-48CB-8E60-F894236E3C8D"}
 */
function cancelar(event) {
	databaseManager.revertEditedRecords()
	databaseManager.setAutoSave(true)
	var $win = application.getWindow('ALTA_INGRESO_EXTRA')
	$win.hide()
	$win.destroy()
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"EDA312CC-B735-4E16-8146-2EE15D4DD769"}
 */
function onShow(firstShow, event) {
	elements.fld_consorcio.requestFocus()
}
